-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disallow GeometryCollection, reformatting #1294
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change in the schema would enforce it at validation
diff --git a/item-spec/json-schema/item.json b/item-spec/json-schema/item.json
index ede4d62a..61475e1b 100644
--- a/item-spec/json-schema/item.json
+++ b/item-spec/json-schema/item.json
@@ -15,6 +15,30 @@
{
"$ref": "https://geojson.org/schema/Feature.json"
},
+ {
+ "$comment": "Disallow GeometryCollection",
+ "not": {
+ "type": "object",
+ "required": [
+ "geometry"
+ ],
+ "properties": {
+ "geometry": {
+ "type": "object",
+ "required": [
+ "type"
+ ],
+ "properties": {
+ "type": {
+ "enum": [
+ "GeometryCollection"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
{
"oneOf": [
{
@@ -260,4 +284,4 @@
]
}
}
-}
+}
\ No newline at end of file
I thought we were already enforcing it in validation, I'll check, thanks. See : #1160 (comment) |
yes right, with the coordinates fields |
This line enforces it, because it doesn't contain GeometryCollection: If that's fine for you, you could approve it @emmanuelmathot |
Co-authored-by: Pete Gadomski <pete.gadomski@gmail.com>
@gadomski @emmanuelmathot Ready for another review. |
Related Issue(s): #1160
Proposed Changes:
PR Checklist:
or a CHANGELOG entry is not required.
and I have opened issue/PR #XXX to track the change.